<?php

declare(strict_types=1);

namespace App\Events;

use Swoole\Http\Request;
use Swoole\Http\Response;

class Exception
{
    public function __construct($throwable, Request $request, Response $response)
    {
        return $response->end(json_encode(['message' => $throwable->getMessage()]));
    }
}